package cn.shop.admin.service.impl;

import cn.shop.admin.entity.UniversalModule.CityVO;
import cn.shop.admin.mapper.UniversalMapper;
import cn.shop.admin.service.UniversalService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author jzw
 * @since 2021-11-05 13:12
 */
@Service
public class UniversalServiceImpl implements UniversalService {

	@Resource
	private UniversalMapper universalMapper;

	/**
	 * 获取城市树
	 *
	 * @return cn.shop.utils.ApiResult<cn.shop.admin.entity.UniversalModule.CityVO>
	 * @author jzw
	 * @since 2021/11/5 13:15
	 */
	@Override
	public List<CityVO> getCityTree(Long id) {
		if (null == id) {
			id = 0L;
		}
		return universalMapper.getCityTree(id);
	}

}
